import {
	apiResquest
} from '@/utils/http.js'

// 详情
export const getUserInfo = (params) => {
	return apiResquest({
		url: 'user/app/getUserInfo',
		method: 'get',
		data: params
	})
}

// 修改
export const updateUserInfo = (params) => {
	return apiResquest({
		url: 'user/app/updateUserInfo',
		method: 'post',
		data: params
	})
}

// 获取头像
export const myAvatar = (params) => {
	return apiResquest({
		url: 'user/app/getMyAvatarInformation',
		method: 'get',
		data: params
	})
}

// 药品图片
export const myDrugInformation = (params) => {
	return apiResquest({
		url: 'user/app/getMyDrugInformation',
		method: 'get',
		data: params
	})
}

// 绑定亲属
export const userHomepageDisplayOne = (params) => {
	return apiResquest({
		url: 'user/app/userHomepageDisplayOne',
		method: 'get',
		data: params
	})
}

// 订单
export const myOrder = (params) => {
	return apiResquest({
		url: 'app/order/list',
		method: 'get',
		data: params
	})
}

// 订单详情
export const myOrderDetail = (params) => {
	return apiResquest({
		url: 'app/order/' + params.id,
		method: 'get',
	})
}

// 订单撤销
export const orderUpdate = (params) => {
	return apiResquest({
		url: 'app/order/update/' + params.id,
		method: 'post',
		data: params
	})
}

// 家属
export const yhMiniUser = (params) => {
	return apiResquest({
		url: 'user/app/yhMiniUserlist',
		method: 'get',
	})
}

// 家属-二级用户查询
export const secondUser = (params) => {
	return apiResquest({
		url: 'app/order/user',
		method: 'get',
	})
}

// 客服电话
export const numberList = (params) => {
	return apiResquest({
		url: 'app/book/list',
		method: 'get',
	})
}

// 修改密码
export const modifyWord = (params) => {
	return apiResquest({
		url: 'user/app/updatePassword',
		method: 'post',
		data: params
	})
}

// 二级用户亲属
export const getSbEquipmentList = (params) => {
	return apiResquest({
		url: 'user/app/getWhoBoundTheSecondaryUser',
		method: 'get',
		data: params
	})
}

// 获取版本号
export const getversion = () => {
	return apiResquest({
		url: 'app/health/prewarn/getAppUpdateInfo',
		method: 'get',
	})
}
